﻿<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<header class="header-area inner-page">
    <th:block th:include="commons/front::public-resource">LOGIN</th:block>
    <th:block th:include="commons/front::login-bar">login-bar</th:block>
    <th:block th:include="commons/front::navigation">navigation</th:block>
    <link th:href="@{/public/front/css/page.css}" rel="stylesheet">
    <script type="text/javascript" th:src="@{/public/front/js/jquery.z-pager.js}"></script>
    <title>套装预览</title>
</header>
<header url="/front/discover"></header>
<style>
    .single-team h3 {
        color: #262626;
        font-size: 24px;
        margin: 28px 0 10px;
    }

    .widget ul li label {
        width: 100%;
        font-size: 14px;
        color: #000;
        font-weight: normal;
    }

    .widget ul li label span.cat-count {
        float: right;
    }
</style>
<body style="height: 100%;">

<ol class="breadcrumb">
    <li title="返回上一页"><a href="javascript:;" onclick="history.go(-1);">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </a></li>
</ol>

<!-- Team Section -->
<section class="team-section teacher-page">
    <div class="container">
        <div class="row">
            <div class="col-sm-8 col-lg-9 col-xs-12">
                <div class="single-team row">
                    <div style="border: solid 2px #ECEEF0;">
                        <input type="hidden" th:value="${statisData.id}" id="id">
                        <img alt="" th:src="${statisData.imgUrl}">
                    </div>
                    <div class="row" th:if="not ${#lists.isEmpty(materialIds)}" style="margin-top: 5px">
                        <a th:each="m,s:${materialIds}" th:href="${m.linkUrl}" target="_blank"
                           style="margin-left: 5px; border: solid 2px #ECEEF0;">
                            <img th:src="${m.imgUrl}" style="width: 60px; height: 60px;">
                        </a>
                    </div>
                    <div class="row">
                        <div class="col-sm-8">
                            <h3 style="width: 100%;" class="text-single-line" th:title="${statisData.source}"
                                th:text="${statisData.source}"></h3>
                            <p th:text="${statisData.descrption}"
                               style="width: 100%; word-wrap: break-word; word-break: normal"></p>
                        </div>
                    </div>

                    <form method="post" class="comment-form" id="suit-form" style="margin-top: 20px">
                        <button type="button" class="primary-btn col-lg-8" id="submit_btn"><span>发布</span></button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>

<th:block th:include="commons/front::footer">FOOTER</th:block>
<th:block th:include="commons/front::login">LOGIN</th:block>
<script>

/*    function back() {
        Confirm("是否确认返回，如果返回您的套装将不会保存", function () {
            // 删除套装
            $.post(ctx + "/front/api/suit/deleteSuit", {id:$("#id").val()}, function (rtn) {
                location.replace(ctx + "/front/user-info-create");
            })
        });
    }*/

    /**
     * 发布
     */
    $("#submit_btn").click(function () {
        $.post(ctx + "/front/api/suit/publishSuit", {id:$("#id").val()}, function (rtn) {

            location.replace(ctx+"/");
        })
    });
    
    

   /* $(function () {
        history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            history.pushState(null, null, document.URL);
        });
    })*/
</script>

</body>
</html>